<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 10 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html>
  <head>
    <title>采购入库单</title>
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	
	<link rel="stylesheet" type="text/css" href="../../css/ios_component.css">
	
	<script type='text/javascript' src='../../dwr/interface/intoStoreHouseService.js'></script>
  	<script type='text/javascript' src='../../dwr/engine.js'></script>
	
	<script type='text/javascript' src='../../js/jquery-1.7.1.min.js'></script>
	<script type='text/javascript' src='../../js/ios.js'></script>
	<script type='text/javascript' src='../../js/ios_component/sel_customer.js'></script>
	<script type='text/javascript' src='../../js/ios_component/sel_date.js'></script>
	<script type='text/javascript' src='../../js/ios_component/sel_oper.js'></script>
	<script type='text/javascript' src='../../js/ios_component/sel_payment.js'></script>
	<script type='text/javascript' src='../../js/ios_component/sel_storehouse.js'></script>
	<script type='text/javascript' src='../../js/ios_component/amount.js'></script>
	<script type='text/javascript' src='../../js/jquery.blockUI.js'></script>
	
	<link rel="STYLESHEET" type="text/css" href="../../js/dhtmlxsuite/dhtmlxGrid/codebase/dhtmlxgrid.css">
	<link rel="stylesheet" type="text/css" href="../../js/dhtmlxsuite/dhtmlxGrid/codebase/skins/dhtmlxgrid_dhx_skyblue.css">
	<script  src="../../js/dhtmlxsuite/dhtmlxGrid/codebase/dhtmlxcommon.js"></script>
	<script  src="../../js/dhtmlxsuite/dhtmlxGrid/codebase/dhtmlxgrid.js"></script>        
	<script  src="../../js/dhtmlxsuite/dhtmlxGrid/codebase/dhtmlxgridcell.js"></script>  
 	<script>
 		$(function(){
 			mygrid = new dhtmlXGridObject('gridbox');
			mygrid.setImagePath("../../js/dhtmlxsuite/dhtmlxGrid/codebase/imgs/");
			mygrid.setHeader("商品编码,商品名称,单位,规格,采购单价,数量,折扣率(%),折后单价,税率(%),含税单价,税额,小计,备注");
			mygrid.setInitWidthsP("8,8,6,6,8,6,9,8,8,8,6,6,*");
			mygrid.setColAlign("right,left,center,right");
			mygrid.setColTypes("ro,ed,ch,price");
			mygrid.setColSorting("int,str,str,str");
			
			mygrid.init();
			mygrid.setSkin("dhx_skyblue");
			mygrid.enableAutoHeight(true);
			//mygrid.enableAutoWidth(true,300,1000);
			//mygrid.loadXML("../../intoStoreHouse_test.do");
			intoStoreHouseService.queryDocumentJour(1,function(dat){
				alert($.JSON.encode(dat))
				mygrid.addRow(1, dat[0].goodsFullName+","+dat[0].goodsFullName);
				mygrid.addRow(2, dat[0].goodsFullName+","+dat[0].goodsFullName);
				
			})
		});
 	</script>
  </head>

  <body>
  	<table width="100%">
  		<tr>
  			<td width=180><span class="ios_document_title">【采购入库单】</span></td>
  			<td width=180>&nbsp;</td>
  			<td align="right">
  				<table>
  					<tr>
  						<td><div iosComponent="sel_date" id="sel_date1" label="付款日期"></div></td>
  						<td><div iosComponent="sel_date" id="sel_date2" label="制单日期"></div></td>
  					</tr>
  				</table>
  			</td>
  		</tr>
  	</table>
  	<table>
  		<tr>
  			<td><div iosComponent="sel_customer" id="sel_customer1"></div></td>
  			<td><div iosComponent="sel_storehouse" id="sel_storehouse1"></div></td>
  			<td></td>
  		</tr>
  		<tr>
  			<td><div iosComponent="amount" id="amount1" label="成交金额"></div></td>
  			<td><div iosComponent="amount" id="amount2" label="付款金额"></div></td>
  			<td><div iosComponent="sel_payment" id="sel_payment" ></div></td>
  		</tr>
  		<tr>
  			<td>开单员：<input type='text' class='component_sel_input' style='width: 60px'/><div style='display: inline;' iosComponent="sel_oper" id="sel_oper1"></div></td>
  			<td>备注：<input type='text' class='component_sel_input'/></td>
  			<td><div iosComponent="amount" id="amount3" label="整单折让"></div></td>
  		</tr>
  	</table>
    <div id="gridbox" ></div>
  </body>
</html>
